import { RouteRecordRaw } from 'vue-router'
import Layout from '@/layout/index.vue'

const configRoutes: RouteRecordRaw[] = [
	{
		path: '/article',
		component: Layout,
		redirect: '/article/list',
		meta: { title: '文章板块', index: 2 },
		children: [
			{
				path: '/article/add-article',
				name: 'add-article',
				component: () => import('@/views/article/add-article.vue'),
				meta: { title: '新增文章', icon: 'DocumentAdd' },
			},
			{
				path: '/article/list',
				name: 'article',
				component: () => import('@/views/article/article.vue'),
				meta: { title: '文章列表', icon: 'Reading' },
			},
		],
	},
]

export default configRoutes
